<?php declare(strict_types=1);
/**
 * College2U — Medical Stream Hub
 * public_html/medical/index.php · v1.0.0 · May 2026
 * Depth: public_html/medical/ → ../../php-portal/includes/
 */

require_once dirname(__DIR__) . '/includes/bootstrap.php';

$current_year = (int) date('Y');

$medical_courses = [
    ['title' => 'MBBS',           'degree' => 'Bachelor of Medicine & Surgery',         'dur' => '5.5 years', 'exam' => 'NEET-UG',     'href' => c2u_url('medical/mbbs-admission'),       'cta' => 'MBBS Admission Guide →'],
    ['title' => 'BDS',            'degree' => 'Bachelor of Dental Surgery',              'dur' => '5 years',   'exam' => 'NEET-UG',     'href' => c2u_url('medical/mbbs-admission'),       'cta' => 'BDS Admission Guide →'],
    ['title' => 'BAMS',           'degree' => 'Ayurvedic Medicine & Surgery',            'dur' => '5.5 years', 'exam' => 'NEET-UG',     'href' => c2u_url('medical/mbbs-admission'),       'cta' => 'BAMS Guide →'],
    ['title' => 'B.Sc Nursing',   'degree' => 'Bachelor of Science in Nursing',         'dur' => '4 years',   'exam' => 'KCET / INC',  'href' => c2u_url('nursing/bsc-nursing-admission'), 'cta' => 'Nursing Admission →'],
    ['title' => 'B.Pharm',        'degree' => 'Bachelor of Pharmacy',                   'dur' => '4 years',   'exam' => 'KCET / PCI',  'href' => c2u_url('pharmacy/bpharm-admission'),    'cta' => 'B.Pharm Guide →'],
    ['title' => 'BPT',            'degree' => 'Bachelor of Physiotherapy',               'dur' => '4.5 years', 'exam' => 'NEET / Direct','href' => c2u_url('medical/mbbs-admission'),      'cta' => 'BPT Guide →'],
];

$faqs = [
    ['q' => 'What NEET score is needed for MBBS in Bangalore ' . $current_year . '?',
     'a' => 'A NEET rank under 10,000 (general category) is typically required for government MBBS seats in Bangalore like BMCRI. Private medical colleges under management quota accept ranks up to 70,000–80,000. College2U provides a free personalised shortlist based on your NEET rank.'],
    ['q' => 'What is the MBBS fee at private medical colleges in Bangalore?',
     'a' => 'The Karnataka Fee Fixation Committee (FFC) caps management quota MBBS fees at approximately ₹13.5 lakh per year at NMC-approved private colleges in Bangalore. NRI quota fees range from ₹25–₹35 lakh per year.'],
    ['q' => 'Which is better — government or private MBBS colleges in Bangalore?',
     'a' => 'Government medical colleges like BMCRI offer fully subsidised seats (₹8,000–₹40,000/year) with state quota via KEA but require a NEET rank under 2,000. Private NMC-approved colleges offer more seats with management and NRI quota options at FFC-regulated fees.'],
    ['q' => 'Is NEET mandatory for all medical courses in Bangalore?',
     'a' => 'Yes for MBBS, BDS, BAMS, BHMS, and BVSc — NEET-UG is mandatory. B.Sc Nursing, B.Pharm, and Physiotherapy have their own entrance exams (KCET or college-level tests). College2U counsellors can guide you for each course.'],
];

$breadcrumbs = [
    ['name' => 'Medical Colleges', 'url' => c2u_url('medical')],
];

$seo = c2u_seo([
    'title'       => 'Medical Colleges in Bangalore ' . $current_year . ' — NEET · MBBS · Nursing Admission | College2U',
    'description' => 'Top medical colleges in Bangalore ' . $current_year . ': NEET cutoffs, MBBS fees, B.Sc Nursing, B.Pharm admission. NMC & INC approved. Free expert counselling.',
    'canonical'   => c2u_url('medical'),
    'og_image'    => c2u_asset('images/og/medical-stream-og.webp'),
    'page_type'   => 'stream',
    'breadcrumbs' => $breadcrumbs,
    'schema'      => [
        c2u_schema_faq($faqs),
        c2u_schema_event(['name' => 'NEET-UG ' . $current_year, 'start_date' => $current_year . '-05-04', 'organizer' => 'National Testing Agency (NTA)', 'organizer_url' => 'https://nta.ac.in']),
    ],
]);

$extra_head = '<style nonce="' . c2u_e(C2U_CSP_NONCE) . '">
:root{--med:#10b981;--med-d:#059669;--med-l:#ecfdf5;--med-em:#6ee7b7;}
.stream-hero{background:linear-gradient(145deg,#021a0e 0%,#05381f 100%);min-height:min(58vh,500px);display:flex;align-items:center;overflow:hidden;position:relative;isolation:isolate;}
.stream-hero__bg{position:absolute;inset:0;background:radial-gradient(ellipse at 70% 50%,rgba(16,185,129,.12) 0%,transparent 70%);z-index:-1;}
.stream-hero__inner{width:100%;max-width:1200px;margin:0 auto;padding:4rem 1.5rem;}
.stream-eyebrow{display:inline-flex;align-items:center;gap:.5rem;background:rgba(16,185,129,.2);border:1px solid rgba(16,185,129,.4);color:var(--med-em);border-radius:2rem;padding:.375rem .875rem;font-size:.8rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;margin-bottom:1.25rem;}
.stream-h1{font-size:clamp(1.875rem,4.5vw,3rem);font-weight:800;color:#fff;letter-spacing:-.025em;margin:0 0 1rem;line-height:1.15;}
.stream-h1 em{color:var(--med-em);font-style:normal;}
.stream-hero__sub{color:rgba(255,255,255,.72);font-size:1rem;line-height:1.65;margin:0 0 2rem;max-width:600px;}
.stream-hero__ctas{display:flex;flex-wrap:wrap;gap:.75rem;}
.btn--stream-primary{background:var(--med);color:#fff;font-weight:700;font-size:.9375rem;padding:.75rem 1.75rem;border-radius:.5rem;text-decoration:none;display:inline-flex;align-items:center;gap:.5rem;transition:background .2s,transform .15s;}
.btn--stream-primary:hover{background:var(--med-d);transform:translateY(-1px);}
.btn--stream-secondary{background:rgba(255,255,255,.1);color:#fff;font-weight:600;font-size:.9375rem;padding:.75rem 1.75rem;border-radius:.5rem;border:1px solid rgba(255,255,255,.25);text-decoration:none;transition:background .2s;}
.btn--stream-secondary:hover{background:rgba(255,255,255,.18);}
.c2u-section{padding:4rem 1.5rem;}.c2u-section--alt{background:#f8fafc;}
.c2u-section-inner{max-width:1200px;margin:0 auto;}
.c2u-section-heading{font-size:clamp(1.375rem,3vw,2rem);font-weight:800;color:#0f172a;letter-spacing:-.025em;margin:0 0 .5rem;}
.c2u-section-sub{font-size:.9375rem;color:#64748b;margin:0 0 2.5rem;line-height:1.6;max-width:560px;}
.course-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.25rem;}
.course-card{background:#fff;border:1.5px solid #e2e8f0;border-radius:1rem;padding:1.5rem;text-decoration:none;display:flex;flex-direction:column;transition:border-color .2s,box-shadow .2s,transform .2s;}
.course-card:hover{border-color:var(--med);box-shadow:0 4px 24px rgba(16,185,129,.12);transform:translateY(-2px);}
.course-badge{display:inline-block;background:var(--med-l);color:var(--med-d);border-radius:.375rem;padding:.25rem .625rem;font-size:.75rem;font-weight:700;margin-bottom:.75rem;}
.course-title{font-size:1.125rem;font-weight:800;color:#0f172a;margin:0 0 .25rem;}
.course-degree{font-size:.875rem;color:#64748b;margin:0 0 1rem;line-height:1.4;}
.course-meta{display:flex;gap:1rem;flex-wrap:wrap;margin-bottom:1.25rem;}
.course-meta span{font-size:.8rem;color:#94a3b8;display:flex;align-items:center;gap:.375rem;}
.course-link{margin-top:auto;font-size:.875rem;font-weight:600;color:var(--med-d);}
.faq-item{border-bottom:1px solid #e2e8f0;}
.faq-q{width:100%;display:flex;justify-content:space-between;align-items:center;background:none;border:none;cursor:pointer;padding:1rem 0;font-size:.9375rem;font-weight:600;color:#0f172a;text-align:left;gap:1rem;}
.faq-q__icon{flex-shrink:0;transition:transform .25s;color:#94a3b8;}
.faq-q[aria-expanded="true"] .faq-q__icon{transform:rotate(180deg);}
.faq-a{padding:0 0 1rem;font-size:.9375rem;line-height:1.65;color:#64748b;}
.faq-a[hidden]{display:none;}
.cta-banner{background:linear-gradient(135deg,var(--med-l),#d1fae5);border:1.5px solid #6ee7b7;border-radius:1rem;padding:2.5rem;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:1.5rem;margin-top:3rem;}
.cta-banner h2{font-size:1.25rem;font-weight:800;color:#064e3b;margin:0;}
.cta-banner p{font-size:.9375rem;color:var(--med-d);margin:.25rem 0 0;}
.btn--cta{background:var(--med);color:#fff;font-weight:700;font-size:.9375rem;padding:.75rem 1.75rem;border-radius:.5rem;text-decoration:none;white-space:nowrap;transition:background .2s;}
.btn--cta:hover{background:var(--med-d);}
</style>';

$page_js = <<<'JS'
(function(){
  document.querySelectorAll('.faq-q').forEach(function(btn){
    btn.addEventListener('click',function(){
      var exp=this.getAttribute('aria-expanded')==='true';
      document.querySelectorAll('.faq-q').forEach(function(b){b.setAttribute('aria-expanded','false');var p=document.getElementById(b.getAttribute('aria-controls'));if(p){p.hidden=true;}});
      if(!exp){this.setAttribute('aria-expanded','true');var panel=document.getElementById(this.getAttribute('aria-controls'));if(panel){panel.hidden=false;}}
    });
  });
})();
JS;

require_once C2U_INCLUDES . '/header.php';
?>

<section class="stream-hero" aria-labelledby="stream-h1">
  <div class="stream-hero__bg" aria-hidden="true"></div>
  <div class="stream-hero__inner">
    <div style="margin-bottom:1.25rem;"><?= c2u_render_breadcrumb($breadcrumbs) ?></div>
    <p class="stream-eyebrow">Medical Admissions <?= $current_year ?></p>
    <h1 class="stream-h1" id="stream-h1">Medical Colleges in <em>Bangalore</em> <?= $current_year ?></h1>
    <p class="stream-hero__sub">
      <abbr title="National Eligibility cum Entrance Test">NEET</abbr> cutoffs, government vs private fees,
      <abbr title="National Medical Commission">NMC</abbr>-approved colleges, and free counselling for
      MBBS, BDS, Nursing, and Pharmacy admissions in Bangalore — all verified from official sources.
    </p>
    <div class="stream-hero__ctas">
      <a href="<?= c2u_e(c2u_url('medical/mbbs-admission')) ?>" class="btn--stream-primary">MBBS Admission <?= $current_year ?> →</a>
      <a href="<?= c2u_e(c2u_url('counselor-booking')) ?>" class="btn--stream-secondary">Book free counselling</a>
    </div>
  </div>
</section>

<section class="c2u-section" id="courses" aria-labelledby="courses-h2" data-reveal>
  <div class="c2u-section-inner">
    <header style="margin-bottom:2.5rem;">
      <h2 class="c2u-section-heading" id="courses-h2">Medical courses in Bangalore</h2>
      <p class="c2u-section-sub">All healthcare programmes available through NEET-UG or KCET in <?= $current_year ?>.</p>
    </header>
    <div class="course-grid" data-animate="stagger" role="list">
      <?php foreach ($medical_courses as $mc): ?>
      <a href="<?= c2u_e($mc['href']) ?>" class="course-card" role="listitem" aria-label="<?= c2u_e($mc['title']) ?> admission guide">
        <span class="course-badge"><?= c2u_e($mc['title']) ?></span>
        <h3 class="course-title"><?= c2u_e($mc['title']) ?></h3>
        <p class="course-degree"><?= c2u_e($mc['degree']) ?></p>
        <div class="course-meta">
          <span><?= c2u_e($mc['dur']) ?></span>
          <span><?= c2u_e($mc['exam']) ?></span>
        </div>
        <span class="course-link"><?= c2u_e($mc['cta']) ?></span>
      </a>
      <?php endforeach; ?>
    </div>
  </div>
</section>

<section class="c2u-section c2u-section--alt" id="faq" aria-labelledby="faq-h2" data-reveal>
  <div class="c2u-section-inner">
    <header style="margin-bottom:2rem;">
      <h2 class="c2u-section-heading" id="faq-h2">Frequently asked questions — Medical admission Bangalore</h2>
    </header>
    <div style="max-width:760px;" role="list">
      <?php foreach ($faqs as $i => $faq): ?>
      <div class="faq-item" role="listitem">
        <button class="faq-q" id="mfaq-btn-<?= $i ?>" type="button" aria-expanded="false" aria-controls="mfaq-a-<?= $i ?>">
          <span><?= c2u_e($faq['q']) ?></span>
          <span class="faq-q__icon" aria-hidden="true"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"><path d="M4 6l5 5 5-5"/></svg></span>
        </button>
        <div class="faq-a" id="mfaq-a-<?= $i ?>" role="region" aria-labelledby="mfaq-btn-<?= $i ?>" hidden>
          <p><?= c2u_e($faq['a']) ?></p>
        </div>
      </div>
      <?php endforeach; ?>
    </div>
    <div class="cta-banner" role="complementary" aria-label="Medical admission counselling">
      <div>
        <h2>Need help choosing a medical college in Bangalore?</h2>
        <p>Get a free personalised shortlist based on your NEET rank from College2U counsellors.</p>
      </div>
      <a href="<?= c2u_e(c2u_url('counselor-booking')) ?>" class="btn--cta">Book free counselling →</a>
    </div>
  </div>
</section>

<?php require_once C2U_INCLUDES . '/footer.php'; ?>
